﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GoldenTuney.Garmin;
using GoldenTuney.GPX;

namespace GoldenTuney
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            TrainingPeaksProvider.TrainingPeaksDataService.Get();
            
        }

        private void btnLoadGPX_Click(object sender, EventArgs e)
        {
        //    GPXLoader a = new GPXLoader();
        //    GPXLoader.
        //     Dim gh As New GarminHelper.GarminHelper()
        //Dim g As New GPXLoader()
        //'Y:\drvrtmp\Projects\Source Control\MediaSpike\GarminSuite\GPXLibrary\TestFiles\DamLoop.gpx
        //g.LoadGPXWaypoints("Y:\drvrtmp\Projects\Source Control\MediaSpike\GarminSuite\GPXLibrary\TestFiles\DamLoop.gpx")
        //gh.LoadGPX("Y:\drvrtmp\Projects\Source Control\MediaSpike\GarminSuite\GPXLibrary\TestFiles\DamLoop.gpx")
  
        }

        private void btnLoadTCX_Click(object sender, EventArgs e)
        {
            GarminHelper gh = new GarminHelper();

            TrainingCenterDatabase_t db;
            db =
                gh.ReadGarminDatabaseXML(
                    @"C:\tmp\CyclingTraining\GoldenDotNet\GoldenTuney\ReferenceFiles\B-Base(Dis).tcx");

            var workoutSteps =
        from p in db.Workouts[0].Step
            select p;
        }
    }
}
